#ifndef __COIDSERVER_SOAP_MSG_H__
#define __COIDSERVER_SOAP_MSG_H__

#include "coid/comm/metastream/fmtstreamxml2.h"

COID_NAMESPACE_BEGIN

class soap_msg
	: public fmtstreamxml2
{
protected:


public:
	soap_msg( binstream& b ) : fmtstreamxml2( b ) {}

	virtual opcd on_write_open() {
		_bufw << 
			"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>\n"
			"  <soap:Body>\n"
			"    <DiscoverResponse xmlns='urn:schemas-microsoft-com:xml-analysis'\n"
			"      xmlns:ddl2='http://schemas.microsoft.com/analysisservices/2003/engine/2'\n"
			"      xmlns:ddl2_2='http://schemas.microsoft.com/analysisservices/2003/engine/2/2'>\n";
		return 0;
	}

	virtual opcd on_write_close() {
		_bufw << 
			"    </DiscoverResponse>\n"
			"  </soap:Body>\n"
			"</soap:Envelope>\n";
		return 0;
	}
};

COID_NAMESPACE_END

#endif // __COIDSERVER_SOAP_MSG_H__
